//// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
//package com.linqingying.gitcode.pullrequest.ui.diff
//
//import com.intellij.collaboration.ui.codereview.diff.DiffLineLocation
//import kotlinx.coroutines.channels.BufferOverflow
//import kotlinx.coroutines.channels.Channel
//import kotlinx.coroutines.flow.Flow
//import kotlinx.coroutines.flow.receiveAsFlow
//import com.linqingying.gitcode.pullrequest.ui.editor.GCPRReviewNewCommentEditorViewModel
//
//interface GCPRNewCommentDiffViewModel : GCPRReviewNewCommentEditorViewModel {
//  val location: DiffLineLocation
//}
//
//internal class GCPRNewCommentDiffViewModelImpl(override val location: DiffLineLocation,
//                                               private val sharedVm: GCPRReviewNewCommentEditorViewModel)
//  : GCPRNewCommentDiffViewModel, GCPRReviewNewCommentEditorViewModel by sharedVm {
//  private val _focusRequestsChannel = Channel<Unit>(1, BufferOverflow.DROP_OLDEST)
//  override val focusRequests: Flow<Unit> get() = _focusRequestsChannel.receiveAsFlow()
//
//  override fun requestFocus() {
//    _focusRequestsChannel.trySend(Unit)
//  }
//}
